﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using LispInterpretor;
using LispInterpretor.DataTypes;

namespace UnitTests
{
    [TestClass]
    public class TestLambda
    {
        [TestMethod]
        public void TestBasicLambdaExpression()
        {
            Number result = (Number)Evaluator.Eval("((\\ (a) (* a a)) 2)");

            Assert.AreEqual(new Number(4), result);
        }

        [TestMethod]
        public void TestParameterlessLambda()
        {
            Number result = (Number)Evaluator.Eval("((\\ () 3))");

            Assert.AreEqual(new Number(3), result);
        }
    }
}
